//package com.example.demo.configure;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.cache.annotation.CachingConfigurerSupport;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import redis.clients.jedis.JedisPool;
//import redis.clients.jedis.JedisPoolConfig;
//
//@Configuration
//@Slf4j
//public class JedisConfig extends CachingConfigurerSupport {
//    @Value("${spring.redis.host}")
//    private String host;
//
//    @Value("${spring.redis.port}")
//    private int port;
//
////    @Value("${spring.redis.timeout}")
////    private int timeout;
////
////    @Value("${spring.redis.pool.max-active}")
////    private int maxActive;
////
////    @Value("${spring.redis.pool.max-idle}")
////    private int maxIdle;
////
////    @Value("${spring.redis.pool.min-idle}")
////    private int minIdle;
////
////    @Value("${spring.redis.pool.max-wait}")
////    private long maxWaitMillis;
//
//    @Bean
//    public JedisPool redisPoolFactory(){
//        JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
////        jedisPoolConfig.setMaxIdle(maxIdle);
////        jedisPoolConfig.setMaxWaitMillis(maxWaitMillis);
////        jedisPoolConfig.setMaxTotal(maxActive);
////        jedisPoolConfig.setMinIdle(minIdle);
////        new JedisPool(jedisPoolConfig,host,port,timeout,null);
//        JedisPool jedisPool = new JedisPool(jedisPoolConfig, host,port);
//        log.info("JedisPool注入成功！");
//        log.info("redis地址：" + host + ":" + port);
//        return  jedisPool;
//    }
//}
